package com.example.demo.controller;

import com.example.demo.bean.Department;
import com.example.demo.bean.Message;
import com.example.demo.bean.Time;
import com.example.demo.bean.Warehouse;
import com.example.demo.sevice.SelectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class SelectController {
    @Autowired
    private SelectService selectService;

    /*查询*/
    @RequestMapping("Select")
    public List<Department> department() {
        return selectService.department();
    }

    /*查询*/
    @RequestMapping("/Select1")
    public List<Message> message(String Hospital) {
        System.out.println(Hospital);
        return selectService.message(Hospital);
    }

    @RequestMapping("/Select2")
    public List<Message> sel(String Hospital){
        System.out.println(Hospital);
        return selectService.sel(Hospital);
    }

    @RequestMapping("/Select3")
    public List<Time> time(String Hospital) {
        return selectService.time(Hospital);
    }


    @RequestMapping("/Select4")
    private List<Warehouse> warehouse(int id) {
        return selectService.warehouse(id);
    }

}
